package org.jimmy.tang.designpattern.behavior.mediator;

/**
 * @author jimmy
 * 
 */
public class ConcreteMediator extends Mediator {
    private ColleagueA ca;
    private ColleagueB cb;

    public ConcreteMediator() {
        ca = new ColleagueA();
        cb = new ColleagueB();
    }

    /* (non-Javadoc)
     * @see org.jimmy.tang.designpattern.behavior.mediator.Mediator#notice(java.lang.String)
     */
    @Override
    public void notice(String content) {
        if (content.equals("boss")) {
            ca.action();
        }
        if (content.equals("client")) {
            cb.action();
        }

    }

}
